package com.lovo.hb.config;

import org.springframework.stereotype.Component;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@Component
public class SysConfig implements WebMvcConfigurer {
    @Override
    public void addCorsMappings(CorsRegistry registry) {
      registry.addMapping("/userRole/**")
              .allowedOrigins("*") //域名
              .allowedHeaders("*") //头
              .allowedMethods("*"); //方法
    }
}
